package com.zhangpu.ribbon.concumser.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: zhangpu
 * @License: (C) Copyright hualala.com Corporation Limited.
 * @Contact: zhangpu@hualala.com
 * @Date: 2021.07.19 18:39
 * @Version: 1.0
 * @Description:
 * @ProjectName: spring-cloud-eureka
 */

@Service
public class RibbonService {

    @Autowired
    RestTemplate restTemplate;

    public String getSpringCloudInfo(String name){
        return restTemplate.getForObject("http://SPRING-CLOUD-PRODUCER/hi/"+name,String.class);
    }
}